﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddEditSalesPersonForDealer.aspx.cs"
    Inherits="partner_AddEditSalesPersonForDealer" validateRequest="false" %>

    
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <link href="../StyleSheet.css" rel="stylesheet" type="text/css" id="dummy2" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <asp:Button ID="btn1" style="font-size:10px" runat="server" Text="<Back" 
         onclick="btn1_Click" />
           
    <asp:Label ID="lblreferer" runat="server" Visible="False"></asp:Label>
    <div>
        <div class="row" style="width:500px;">
          <span class="bodyTextBold" >Choose a dealer:</span>
            <asp:DropDownList ID="drpDealers" runat="server" CssClass="DropDownList"  AutoPostBack="True" OnSelectedIndexChanged="drpDealers_SelectedIndexChanged">
            </asp:DropDownList>
        </div>

         <div class="row">
          
        </div>

       
   
    <div class="row" style="width:500px;">
       <span class="bodyTextBold" >Salesmen:</span>

       <span style="margin-left:50px;"> 
        <asp:Button ID="btnInsert" class="TextBox"  runat="server" onclick="btnInsert_Click" 
            Text="Add New SalesMen" />
            </span>
    </div>
    <asp:GridView ID="grdSalesMen" runat="server" CellPadding="4" ForeColor="#333333"
        GridLines="None" OnRowCancelingEdit="grdSalesMen_RowCancelingEdit" OnRowEditing="grdSalesMen_RowEditing" 
        onrowcommand="grdSalesMen_RowCommand" 
        onrowdeleting="grdSalesMen_RowDeleting" onrowupdating="grdSalesMen_RowUpdating">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="dealeremployeeID" HeaderText="de" />
            <asp:TemplateField HeaderText="Salesmen Name">
                <ItemTemplate>
                    <%# Eval("dealerEmployee")%></ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtUserName" runat="Server" Text='<%# Eval("dealerEmployee") %>'></asp:TextBox></EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtUserName" runat="Server"></asp:TextBox></FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Password">
                <ItemTemplate>
                    <%# Eval("pwd") %></ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtPassword" runat="Server" Text='<%# Eval("pwd") %>'></asp:TextBox></EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtPassword" runat="Server"></asp:TextBox>
                    <asp:Button ID="btnInsert"  runat="Server" Text="Insert" CommandName="Insert" UseSubmitBehavior="False" />
                    <asp:Button ID="btnCancel"  runat="Server" Text="Cancel" CommandName="Cancel" UseSubmitBehavior="False" />

                    </FooterTemplate>
            </asp:TemplateField>
 
           
           
            
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
 
           
           
            
        </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <EmptyDataTemplate>
            UserName
            <asp:TextBox ID="txtUserName" runat="Server"></asp:TextBox>
            Password
            <asp:TextBox ID="txtPassword" runat="Server"></asp:TextBox>
           
            <asp:Button ID="btnInsert" runat="Server" Text="Insert" CommandName="EmptyInsert"
                UseSubmitBehavior="False" /></EmptyDataTemplate>

                <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />

                </asp:GridView>
                 </div>
    </form>
</body>
</html>
